<html><!-- InstanceBegin template="/Templates/admin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="css/layout.css" />
<link rel="stylesheet" type="text/css" href="css/style1.css" />
<script language="javascript" type="text/javascript" src="js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.easing.js"></script>
<script language="javascript" type="text/javascript" src="js/script.js"></script>
<script type="text/javascript">
 $(document).ready( function(){	
		// buttons for next and previous item						 
		var buttons = { previous:$('#jslidernews1 .button-previous') ,
						next:$('#jslidernews1 .button-next') };			
		 $('#jslidernews1').lofJSidernews( { interval : 4000,
											direction		: 'opacitys',	
											easing			: 'easeInOutExpo',
											duration		: 1200,
											auto		 	: true,
											maxItemDisplay  : 4,
											navPosition     : 'horizontal', // horizontal
											navigatorHeight : 32,
											navigatorWidth  : 80,
											mainWidth		: 950,
											buttons			: buttons } );	
	});
</script>
<link rel="stylesheet" href="css/product_edit.css" type="text/css">
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>
<div id="wrap">
  <div id="header"></div>
	<div id="Layer8">
  	<div id="Layer32">	
		<div id="Layer33">
			<?php 
				$page = 1;
			?>		
			<a href="quanlysanpham.php?&page = <?php echo $page?>">
				<p id="fontAdmin">Quản Lý Sản Phẩm</p>
		  </a>
	  </div>
	</div>
	<div id="Layer34">
		<div id="Layer35">
			<a href="quanlythanhvien.php">
				<p id="fontAdmin">Quản lý thành viên</p>
		  </a>
 	  </div>
	</div>
	<div id="Layer36">	
		<div id="Layer37">	
			<a href="quanlytinkhuyenmai.php">
				<p id="fontAdmin">Quản lý tin khuyến mãi</p>
		  </a>
	  </div>
	</div>
	<div id="Layer38">
		<div id="Layer39">
			<a href="thongkesanpham.php">
				<p id="fontAdmin">Thống kê sản phẩm</p>
		  </a>
	  </div>
	</div>
	<div id="Layer40">	
		<div id="Layer41">
			<a href="quanlyhoadon.php">
				<p id="fontAdmin">Quản lý hoá đơn</p>
		  </a>
	  </div>
	</div>
	<div id="Layer42">	
		<div id="Layer43">
			<a href="quanlynhacungcap.php">
				<p id="fontAdmin">Quản lý nhà cung cấp</p>
		  </a>
	  </div>
	</div>
  </div>
  <div id="Layer28"><!-- InstanceBeginEditable name="EditRegion3" -->
  <?php
  	require("connect.php");
	$pID = $_REQUEST["pID"];
	$query = "select * from product where pID = {$pID}";
	$product = mysql_query($query) or  die("Not excute command! ".$query);
	$row = mysql_fetch_array($product);
  ?>
    <table width="600" border="0" align="center" id="styleTable">
	<form action="product_edit_action.php" enctype="multipart/form-data">
      <tr bgcolor="#70a972" style="color:#FFFFFF;font-size:18px">
        <td scope="col" colspan="2" align="center"><span class="style4">Mời bạn nhập lại thông tin sản phẩm</span></td>
      </tr>
      <tr >
        <td class="style4" >Mã sản phẩm </td>
        <td ><input type="text" name="txtpID" value="<?php echo $row['pID'] ;?>"></td>
      </tr>
      <tr >
        <td width="149" ><span class="style4">Tên sản phẩm:</span></td>
        <td width="212" ><input type="text" name="txtpName" value="<?php echo $row['pName'] ;?>"></td>
        </tr>
      <tr >
        <td ><span class="style4">Ảnh sản phẩm: </span></td>
        <td ><input type="file" name="file" value="<?php echo $row['pImage'] ;?>"> </td>
        </tr>
      <tr >
        <td ><span class="style4">Số lượng: </span></td>
        <td ><input name="txtpAmount" type="text" value="<?php echo $row['pAmount'] ;?>"></td>
        </tr>
      <tr >
        <td ><span class="style4">Thời gian bảo hành: </span></td>
        <td ><input name="txtpWarranty" type="text" value="<?php echo $row['pWarranty']?>"></td>
        </tr>
      <tr>
        <td ><span class="style4">Thông tin chi tiết: </span></td>
        <td ><textarea name="txtpDetail"><?php echo $row['pDetail']; ?></textarea></td>
      </tr>
      <tr>
        <td ><span class="style4">Giá:</span></td>
        <td ><input type="text" name="txtpPrice" value="<?php echo $row['pPrice']?>"></td>
        </tr>
      <tr>
        <td ><span class="style4">Loại sản phẩm: </span></td>
        <td >
			<?php
				$sqlCatagory = "select * from catagory";
				$catagory = mysql_query($sqlCatagory) or die("Not excute command ".$slqCatagory);			 
			?>
			<select name="slCatagory">
				<?php while($rowCatagory = mysql_fetch_array($catagory))
				{
				?>
				<option value="<?php echo $rowCatagory['catID'] ;?>"><?php echo $rowCatagory['catName']; ?></option>
				<?php
				}
				?>
			</select>		</td>
      </tr>
      <tr>
        <td class="style4" >Trạng thái: </td>
        <td ><input type="text" name="txtpStatus" value="<?php echo $row['pStatus'] ;?>"></td>
      </tr>
      <tr>
        <td class="style4" >Nhà cung cấp: </td>
        <td >
			<?php
				$sqlSupplier = "select * from subplier";
				$supplier = mysql_query($sqlSupplier) or die("Not excute command ".$sqlSupplier);
			?>
			<select name="slSubplier">
				<?php while($rowSupplier = mysql_fetch_array($supplier))
				{
				?>
				<option value="<?php echo $rowSupplier['subID'] ;?>">
					<?php echo $rowSupplier['subName']?>				</option>
				<?php
				}
				?>
			</select>		</td>
      </tr>
      <tr>
        <td class="style4" >Loại khuyến mại: </td>
        <td >
			<?php
				$sqlPromotion = "select * from promotion";
				$promotion = mysql_query($sqlPromotion) or die("Not excute command ".$sqlPromotion);
			?>
			<select name="slPromotion">
				<?php while($rowPromotion = mysql_fetch_array($promotion))
				{
				?>
				<option value="<?php echo $rowPromotion['ptID'] ;?>"><?php echo $rowPromotion['ptTitle']; ?></option>
				<?php
				}
				?>
			</select>		</td>
        </tr>
      <tr>
        <td align="right"><span class="style4">
          <input name="Submit" type="submit" class="style4" value="Lưu lại">
        </span></td>
        <td ><input type="reset" name="Submit2" value="Huỷ"></td>
        </tr>
	  </form>
    </table>
  <!-- InstanceEndEditable --></div>
<div id="Layer25"></div>
<div id="Layer26">
	<div id="Layer27">
		<center>
			
			<p>Copyright © 2011 Nội thất vệ sinh - Nội thất phòng tắm - Thiết bị vệ sinh - Nội thất cao cấp
			Thông tin trên web chỉ là tham khảo. Chúng tôi chưa cung cấp thông tin hoặc dịch vụ trên website này
			Phát triển bởi Thiết Kế Website Đẹp		</p>
			<p>Design By :H3TL  </p>
		</center>
	</div>
</div>

</div>
<!------------------------------------- END OF THE CONTENT ------------------------------------------------->





































</body>
<!-- InstanceEnd --></html>
